import request from '@/utils/request'
// 查询任务列表
export function listPatrolTask(query) {
  return request({
    url: '/robot/patroltask/list',
    method: 'get',
    params: query
  })
}
// 查询任务历史列表
export function listPatrolTaskHIS(query) {
  return request({
    url: '/robot/patroltaskresult/list',
    method: 'get',
    params: query
  })
}
// 查询任务历史曲线图表
export function listPatrolTaskHIScharts(query) {
  return request({
    url: '/robot/patroltaskresult/listchart',
    method: 'get',
    params: query
  })
}
// 查询任务历史曲线最小值图表
export function listPatrolTaskHIScharts1(query) {
  return request({
    url: '/robot/patroltaskresult/listchart1',
    method: 'get',
    params: query
  })
}
// 查询任务列表，不含分页
export function listPatrolTasks(query) {
  return request({
    url: '/robot/patroltask/lists',
    method: 'get',
    params: query
  })
}
// 查询任务详细
export function getPatrolTask(id) {
  return request({
    url: '/robot/patroltask/' + id,
    method: 'get'
  })
}
// 根据任务id查询巡检点列表
export function getPatrolTaskPoint(id) {
  return request({
    url: '/robot/patroltask/listpoint/' + id,
    method: 'get'
  })
}
//查询巡检点
export function getPatrolTaskPoints(id) {
  return request({
    url: '/robot/patroltask/listpoints/' + id,
    method: 'get'
  })
}
export function getCheck(id) {
  return request({
    url: '/robot/patroltask/getCheck/' + id,
    method: 'get'
  })
}
// 新增任务
export function addPatrolTask(data) {
  return request({
    url: '/robot/patroltask',
    method: 'post',
    data: data
  })
}
// 修改任务
export function updatePatrolTask(data) {
  return request({
    url: '/robot/patroltask',
    method: 'put',
    data: data
  })
}
// 删除任务
export function delPatrolTask(id) {
  return request({
    url: '/robot/patroltask/' + id,
    method: 'delete'
  })
}
// 删除任务历史数据
export function delPatrolTaskHIS(id) {
  return request({
    url: '/robot/patroltaskresult/' + id,
    method: 'delete'
  })
}
// 设置自动任务
export function AutoPatrolTask(ids) {
  return request({
    url: '/robot/patroltask/setautotask/' + ids,
    method: 'get'
  })
}
// 取消自动任务
export function UAutoPatrolTask(ids) {
  return request({
    url: '/robot/patroltask/usetautotask/' + ids,
    method: 'get'
  })
}
// 恢复任务
export function restoreTask(id) {
  return request({
    url: '/robot/patroltask/restoretask/' + id,
    method: 'delete'
  })
}
// 报警、巡检列表
export function alarmtaskResult(query) {
  return request({
    url: '/robot/patroltask/alarmtaskresult',
    method: 'get',
    params: query
  })
}
// 查询报告详细
export function getReportInfo(query) {
  return request({
    url: '/robot/aerationresult/getreportinfo',
    method: 'get',
    params: query
  })
}
// 删除报告
export function delAerationReport(query) {
  return request({
    url: '/robot/aerationresult/delaerationreport',
    method: 'get',
    params: query
  })
}
